<?php
if (isset($db)) return;

$dbhost="localhost";
$dbuser="sambaindex";
$dbpass="indexSamba";
#$dbname="samba2";
$dbname="sambaindex";

$mysql=new mysqli($dbhost,$dbuser,$dbpass,$dbname);

$current_files_sql="select files.id,hostname,sharename,pathname,filename,filesize from files join (hosts, shares, paths, int_settings) on (int_settings.name='curscan' and files.scan=int_settings.value and files.hostid=hosts.id and files.shareid=shares.id and files.pathid=paths.id) "
/*
Query for getting all information of a file
select files.id,hostname,sharename,path,filename,filesize from files join (hosts, shares, paths, int_settings) on (files.hostid=hosts.id and files.shareid=shares.id and files.pathid=paths.id and int_settings.name='curscan' and files.scan=int_settings.value)
*/
?>
